package org.lilystudio.veryftp.enumeration;

public enum IndexState {
	DONE,NEW,PURGE;  //indexUpdate不需要了
	
	public int toInteger(){
		int result=0;
		switch (this){	
		case NEW:result=1;break;	
		//case indexUpdate:result=2;break;
		case PURGE:result=2;break;
		case DONE:result=0;break;
		}
		return result;		
	}
	
	public static IndexState convertFromInteger(int i){		
		if(i==1)
			return NEW;
		//else if(i==2)
			//return indexUpdate;
		else if(i==2)
			return PURGE;
		else 
			return DONE;
	}
}
